The present invention is disclosed in the context of a timer subsystem of an integrated circuit microcomputer. The timer subsystem has a plurality of channels, each of which is capable of performing several operations related to timing. A single micro-programmable service processor is dedicated to providing the processing power necessary to complement the abilities of each channel in order to perform the types of timing functions typically required of such a microcomputer. Certain features of the architecture of this service processor provide significant advantages in terms of the ability of a user of the system to use the individual timer channels together to perform complex timing functions. In addition, certain features of the processor architecture substantially ease the task of creating micro-programs, or "primitives", for execution by the service processor.
Examples of timing functions which may be required of the timer subsystem of a microcomputer include the timing of spark plug firing and fuel injection in an automobile engine and the timing of shutter operation in a camera. These applications, and many others, require the timer subsystem to respond to the occurrence of an external event, perform one or more calculations to determine when to trigger another event and then to trigger the second event at the appropriate time.
Prior art timer subsystems for microcomputers rely on the host microcomputer for the processing power necessary to perform any calculations required for the operation of the timer subsystem. The host microcomputer, which is a general purpose computer, is usually not specifically designed to be efficient at servicing the needs of a subsystem such as a timer. The preferred embodiment of the present invention is an example of the application of "distributed intelligence" to the context of microcomputers. That is, microcomputer subsystems including some degree of local processing power allow the host processor to be dedicated to higher-level processing tasks.